<?
$sql = "
select 
		OBJECT_NAME(A.id) AS PROC_NAME, 
		A.name			  AS PARAM_NAME, 
		case 
			when A.isoutparam = 1 then 'OUT' 
			else 'IN'
		end 			  AS PARAM_INOUT, 
		A.length		  AS PARAM_LENGTH, 
		B.name			  as PARAM_TYPE, 
		C.text			  as PARAM_DEFAULT
from 
	syscolumns A 
	inner join systypes B on (A.xtype = B.xtype) 
	left outer join sysproperties D on (A.id = D.id and A.colid = D.smallid) 
	left outer join syscomments C on (A.cdefault = C.id ) 
where 
	A.id = OBJECT_ID('{$param['object']}') 
order by 
	colorder 
";

return $sql;

?>